using System;
using System.Drawing;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
class FormSize :Form
{

	static void Main()
	{
		Application.Run(new FormSize());
	}
	public FormSize()
	{
		Text="FormSize";
		BackColor=SystemColors.Window;//.White;
		ForeColor=SystemColors.WindowText;
	}
	protected override void OnMove(EventArgs ea)
	{
		Invalidate();
	}
	protected override void OnResize(EventArgs ea)
	{
		Invalidate();
	}

	protected override void OnPaint(PaintEventArgs pea)
	{
		Graphics g=pea.Graphics;
		Rectangle rect=new Rectangle (0,0,101,101);
		Rectangle rect2=new Rectangle(100,100,100,100);
		g.DrawRectangle(new Pen(Color.Tomato),rect);
		g.DrawRectangle(new Pen(Color.YellowGreen),rect2);
		if(rect.IntersectsWith(rect2))
			Console.WriteLine("intersect");
		if(rect2.Contains(new Point(100,100)))
			Console.WriteLine("rect2 constain 100,100");
//		Console.WriteLine(g);
	}



	
}